<%@ page import="com.jfinal.plugin.activerecord.Db" %>
<%@ page import="com.jfinal.kit.StrKit" %>
<%@ page import="org.apache.commons.lang3.StringUtils" %>
<%@ page import="java.util.List" %>
<%@ page import="com.jfinal.kit.JsonKit" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="cn.szzsi.common.model.Member" %><%--
  Created by IntelliJ IDEA.
  User: weimin28
  Date: 2017/1/2
  Time: 下午4:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String pid = request.getParameter("pid");
    String id = request.getParameter("id");
    if(StrKit.notBlank(pid)){
        Member pmember = Member.dao.findById(pid);
        Member member = Member.dao.findById(id);
        if(pmember != null && member !=null){

            //我的所有下级的关系
            List<Member> list = Member.dao.find("select * from member where ");

            member.set("pid",pmember.getStr("id")).set("pids",pmember.getStr("pids")+","+pid).update();

        }
    }else{
        out.print("");
        out.flush();
    }
%>
